#include <new>

#include "Class/Entity/Image.hpp"

namespace		Entity
{
  Image::Image()
	:	Entity::ADrawable(),
		Component::Image(),
		_Sprite(new (std::nothrow) sf::Sprite)
  {
	this->_Sprite->SetImage(*this->_GetImage());
  }
  Image::Image(Image const &img)
	:	Entity::ADrawable(),
		Component::Image(img),
		_Sprite(new (std::nothrow) sf::Sprite(*img._Sprite))
  {
	this->_Sprite->SetImage(*this->_GetImage());
  }


  Image::~Image() throw()
  {
	if (this->_Sprite)
	  delete this->_Sprite;
  }
}
